package main
import (
 "bufio"
 "time"
rand "math/rand"
 "strings"
 "fmt"
 "strconv"
 "os"
)
 
 
 
 
 
 
 
 func  main  ()  {



reader := bufio.NewReader(os.Stdin)
 

 rand.Seed(time.Now().UnixNano())



secret := rand.Intn(100) + 1
 
for {
    
 fmt.Println("Please input your guess.")


var3_result := func() Result[string, error] {
    var1_check, var2_err := reader.ReadString('\n')
    if var2_err != nil {
        return make_Result_Err[string, error](var2_err)
    }
    return make_Result_Ok[string, error](var1_check)
}()

text := var3_result.Unwrap()
 


text = strings.TrimSpace(text)
 
var guess int


var6_result := func() Result[int, error] {
    var4_check, var5_err := strconv.Atoi(text)
    if var5_err != nil {
        return make_Result_Err[int, error](var5_err)
    }
    return make_Result_Ok[int, error](var4_check)
}()

 var7_subject := var6_result
var8_matches := 0



if var8_matches != 2 {
    var8_matches = 0

    var9_match_pat := 0
n := var7_subject.Ok

if var9_match_pat != 1 && var7_subject.tag == Result_Ok {
    var8_matches = 2
} else {
    var8_matches = 1
}

    _ = var7_subject

    if var8_matches == 2 {
        
        guess =  n
    }
}


if var8_matches != 2 {
    var8_matches = 0

    var11_match_pat := 0
if var11_match_pat != 1 { var11_match_pat = 2 /* wildcard */ }

if var11_match_pat != 1 && var7_subject.tag == Result_Err {
    var8_matches = 2
} else {
    var8_matches = 1
}

    _ = var7_subject

    if var8_matches == 2 {
        continue
        
    }
}
 


 fmt.Println("You guessed: ", guess)


if guess < secret {
    
 fmt.Println("Too small!")
    
} else {
    

if guess > secret {
    
 fmt.Println("Too big!")
    
} else {
    {

 fmt.Println("Correct!")
break 
}
    
}
    
}  
}  
}